#include "Goal_FollowCharacter.h"
#include "Goal_Types.h"
#include "ExecutionLog.h"
Goal_FollowCharacter::Goal_FollowCharacter(Character* owner, Character *leader, Vector2D offset):Goal(owner, goal_follow_character),
																									m_pLeader(leader),
																									m_vOffset(offset)
{}

void Goal_FollowCharacter::Activate()
{
	m_iStatus = active;
	m_pOwner->FollowCharacter(m_pLeader, m_vOffset);
}

int Goal_FollowCharacter::Process()
{
	ActivateIfInactive();
	/*	As of now, there is no need for anything in the process function. Later, I might need to include some
		code to handle certain occurances (such as, this character getting stuck). */

	return m_iStatus;
}

void Goal_FollowCharacter::Terminate()
{
	m_pOwner->StopFollowingCharacter();
}